﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="manage_news_news_page" Codebehind="news_page.aspx.cs" %>
<%@ Register Src="../../controls/UserPop.ascx" TagName="UserPop" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="../../sysImages/<%Response.Write(NetCMS.Config.UIConfig.CssPath());%>/css/css.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/javascript" src="../../configuration/js/Prototype.js"></script>
<script language="JavaScript" type="text/javascript" src="../../configuration/js/Public.js"></script>
<script type="text/javascript" src="../../editor/fckeditor.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <table id="top1" width="100%"  border="0" cellpadding="0" cellspacing="0" class="toptable">
        <tr>
          <td style="height:1px;" colspan="2"></td>
        </tr>
        <tr>
          <td style="width:30%;PADDING-LEFT: 14px" class="sysmain_navi">单页面添加</td>
          <td style="width:70%;"  class="topnavichar"><div align="left"><a href="../main.aspx" class="topnavichar" target="sys_main">首页</a><img alt="" src="../../sysImages/folder/navidot.gif" border="0" /><a href="class_list.aspx" class="topnavichar" target="sys_main">栏目管理</a><span id="naviClassName" runat="server" /><img alt="" src="../../sysImages/folder/navidot.gif" border="0" />添加单页面</div></td>
        </tr>
    </table>
    
    <table width="98%" align="center" border="0" cellpadding="3" cellspacing="0" class="table">
    <tr>
      <td class="TR_BG_list"  style="width: 100px;text-align:right;">
       页面标题
      </td>
      <td class="TR_BG_list">
       <asp:TextBox ID="TCname" Width="300" CssClass="form" runat="server"></asp:TextBox>
      <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TCname" Display="Dynamic" ErrorMessage="<span class=reshow>(*)名字不能为空!</span>"></asp:RequiredFieldValidator>
      <asp:CheckBox ID="NaviShowtf" Text="导航中显示" runat="server" />
      </td>
    </tr>
    <tr>
      <td class="TR_BG_list"  style="width:100px;text-align:right;">
       父栏目
      </td>
      <td class="TR_BG_list"> <span style="display:none;"><asp:TextBox ID="TParentId" runat="server" MaxLength="100" Width="80" CssClass="form"></asp:TextBox><img src="../../sysImages/folder/s.gif" alt="选择栏目" border="0" style="cursor:pointer;" onclick="selectFile('newsclass',document.form1.TParentId,250,500);document.form1.TParentId.focus();" /></span><span id="ClassCnamev" class="reshow"></span>
      <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TParentId" Display="Dynamic" ErrorMessage="<span class=reshow>(*)选择栏目!如果为根栏目，请填写0</span>"></asp:RequiredFieldValidator>
      &nbsp;权重&nbsp;<asp:TextBox ID="TOrder" runat="server" Width="93" CssClass="form"></asp:TextBox> <span class="helpstyle" style="cursor:hand;" title="点击查看帮助" onclick="Help('Class_Aspx_05',this)">帮助</span>
      </td>
    </tr>
    <tr>
      <td class="TR_BG_list"  style="width: 100px;text-align:right;">
       meta关键字
      </td>
      <td class="TR_BG_list">
       <asp:TextBox ID="KeyMeata" TextMode="MultiLine" Height="50" CssClass="form" Width="500" runat="server"></asp:TextBox>
      </td>
    </tr>
    <tr>
      <td class="TR_BG_list"  style=" width: 100px;text-align:right;">
       meta描述
      </td>
      <td class="TR_BG_list">
       <asp:TextBox ID="BeWrite" TextMode="MultiLine" Height="50" CssClass="form" Width="500" runat="server"></asp:TextBox>
      </td>
    </tr>
    <tr class="TR_BG_list" id="div_Templet">
      <td style="width:10%;text-align:right;">模板</td>
      <td style="width:90%;">
      <asp:TextBox ID="FProjTemplets" runat="server" MaxLength="200" Width="40%" CssClass="form"></asp:TextBox><img src="../../sysImages/folder/s.gif" alt="" border="0" style="cursor:pointer;" onclick="selectFile('templet',document.form1.FProjTemplets,250,500);document.form1.FProjTemplets.focus();" />
      <span class="helpstyle" style="cursor:help;" title="点击显示帮助" onclick="Help('H_page_add_Templet',this)">帮助</span>
      
      </td>
    </tr>  
    
    <tr class="TR_BG_list" id="Tr1">
      <td style="width:10%;text-align:right;">路径及文件名</td>
      <td style="width:90%;">
      <asp:TextBox ID="TPath" runat="server" MaxLength="200" Width="40%" CssClass="form"></asp:TextBox>
      <span class="helpstyle" style="cursor:help;" title="点击显示帮助" onclick="Help('H_page_add_path',this)">帮助</span>
      </td>
    </tr>   
    
        <tr>
      <td class="TR_BG_list"  style="width: 100px;text-align:right;">
       内容
       <div><a style="cursor:pointer;" onclick="selectFile('picEdit',document.getElementById('picContentTF'),320,500);" title="在上传的时候，请在编辑区鼠标点击，设置要上传图片的位置。"><font color="blue">选择图片</font></a></div>
      </td>
      <td class="TR_BG_list">
            <label id="picContentTF"></label>
            <script type="text/javascript" language="JavaScript">
			window.onload = function()
				{
				var sBasePath = "../../editor/"
                var oFCKeditor = new FCKeditor('Content') ;
                oFCKeditor.BasePath	= sBasePath ;
                oFCKeditor.Width = '100%' ;
                oFCKeditor.Height = '400px' ;	
                oFCKeditor.ReplaceTextarea() ;
                }

                function insertHTMLEdit(url)
                {
                 var urls = url.replace('{@dirfile}','<% Response.Write(NetCMS.Config.UIConfig.dirFile); %>')
                var oEditor = FCKeditorAPI.GetInstance("Content");
                if (oEditor.EditMode==FCK_EDITMODE_WYSIWYG)
                {
                   oEditor.InsertHtml('<img src=\"'+urls+'\" border=\"0\" />');
                }
                else
                {
                    return false;
                }
                return;
                }
            </script>
			<textarea name="Content" rows="1" cols="1" style="display:none" id="Content" runat="server" ></textarea>
      </td>
    </tr>
    <tr class="TR_BG_list" id="div_UserPop1" style="display:none;">
          <td style="text-align:right;">浏览权限</td>
          <td>
          <uc1:UserPop ID="UserPop1" runat="server" />
          </td>
    </tr>  
    </table> 
    
    <table width="98%" align="center" border="0" cellpadding="3" cellspacing="0" class="table">
    <tr>
      <td style="text-align:center;" class="TR_BG_list">
     <asp:HiddenField ID="gClassID" runat="server"/>
     <asp:HiddenField ID="acc" runat="server"/>
      <asp:Button ID="Button1" runat="server" CssClass="form" Text="保存单页面" OnClick="Buttonsave_Click" />
      </td>
    </tr>
    </table> 
	<br /><br />
 <table width="100%" border="0" cellpadding="8" cellspacing="0" class="copyright_bg" style="height: 76px">
   <tr>
     <td align="center"><div runat="server" id="SiteCopyRight" /></td>
   </tr>
 </table>
    </form>
</body>
</html>
<script language="javascript" type="text/javascript">
new Form.Element.Observer($('TParentId'),1,getClassCName());

    function getClassCName() 
    {
        var strC=document.getElementById("TParentId").value;
	    var  options={  
				       method:'get',  
				       parameters:"Type=Class&add=1&ClassID="+strC,  
				       onComplete:function(transport)
					    {  
						    var returnvalue=transport.responseText;
						    if (returnvalue.indexOf("??")>-1)
                               $('ClassCnamev').innerHTML="error!";
						    else
                               $('ClassCnamev').innerHTML=returnvalue;
					    }  
				       }; 
	    new  Ajax.Request('../../configuration/system/getClassCname.aspx?no-cache='+Math.random(),options);
    } 

</script>